package com.qf.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public class RandomUtil {
    //生成激活码
    public static String createActiveCode(){
        Random random = new Random();
        return getTime()+Integer.toHexString(random.nextInt(999999999));
    }
    public static String getTime(){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
        return sdf.format(new Date());
    }
    public static String createOrderId(){
        return getTime()+new Random().nextInt(999999);
    }
}
